def signal(*args):
    df, n, factor_name = args[0], args[1], args[2]
    df[factor_name] = df['fundingRate'].rolling(n, min_periods=1).min()
    return df
